import App from './App'
import store from './store'

import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

// 引入全局TuniaoUI
import TuniaoUI from 'tuniao-ui'
Vue.use(TuniaoUI)

// 引入TuniaoUI提供的vuex简写方法
let vuexStore = require('@/store/$tn.mixin.js')
Vue.mixin(vuexStore)

import common from '@/utils/common.js';
Vue.prototype.$common = common;

import echarts from '@/utils/echarts/install.js';

// #ifdef APP-PLUS
//重写toast方法如果内容为 ‘再按一次退出应用’ 就隐藏应用，其他正常toast
plus.nativeUI.toast = (function(str) {
	if (str == '再按一次退出应用') {
		return false;
	}
});
// #endif

const app = new Vue({
	store,
	...App
})
common.loadConfigFile(process.env).then((res) => {
	require('@/utils/request/index')(app)
	app.$mount()
});